package cn.le.releaseSub;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 项目名  spring-boot
 * Created by lansp
 * Created at 2018/6/1
 * 描述:
 */
@Component
public class FanoutSender {

	@Autowired
	private AmqpTemplate template;

	public void send(){
		String context = "hi,fanout msg";
		System.out.println("Sender : " + context);
		template.convertAndSend("fanoutExchange","",context);
	}

}
